ILP-based Resource-aware Compilation
نویسندگان
چکیده
Compilers are an important part of today’s computational infrastructure because software is ever-increasingly written in high-level programming languages like C, C++, and Java. Early on, compilers were successful for desktop computing, and now they are also used for mission-critical software, trusted mobile code, and real-time embedded systems. The field of compiler design is driven by the advent of new languages, new run-time systems, and new computer architectures, and the need for compilers to be fast, to translate into efficient code, and to be correct. Even the smallest of bugs introduced by a compiler can lead to failures, security breaches, and crashes in an otherwise correct system. This chapter focuses on compilers for embedded software. For embedded systems, predictability and resource-awareness are of greater importance than execution efficiency. For example, if a compiler is not aware of the size of the instruction store for generated code, opportunities to squeeze code into the available space can be lost. A programmer can often hand-optimize generated code, but this is tedious and error-prone, and does not scale to large systems. We present a snap-shot of the state-of-the-art and challenges faced by resourceaware compilers. We focus on a technique commonly used in resource-aware compilation, namely, static analysis based on integer linear programming (ILP). A static analysis determines facts about a program that are useful for optimizations. One can present a static analysis in a variety of ways, including data-flow equations, set constraints, type constraints, or integer constraints. The use of integer constraints is an emerging trend in approaches to register allocation, instruction scheduling, code-size minimization, energy efficiency, and so forth. In general, integer constraints seem well-suited for building resource-aware compilers. The resources in question can be registers, execution time, code space, energy, or others that are in short supply. Resource-aware compilation is particularly important for embedded systems where economic considerations often lead to the choice of a resource-impoverished processor. Integer constraints, in the form of ILPs, have been used to assist in the compilation of embedded software since the early 1990’s. Satisfaction of an ILP is NP-complete, but there are many research results and tools concerned with solving ILPs efficiently. Off-the-shelf tools like CPLEX [1] make ILP well-suited for use in compilers because they provide analysis engines that need to be written once and for all. In effect, a compiler writer sees a clean separation
منابع مشابه
Region-based Register Allocation for EPIC Architectures
Instruction-level parallelism(ILP) refers to a family of processor and compiler design techniques that speed up execution by allowing individual machine operations to execute in parallel. Explicitly Parallel Instruction computing (EPIC) processors evolved in an attempt to achieve high levels of ILP without significant hardware complexity. To take advantage of higher level of ILP in EPIC, the IL...
متن کاملDemand-driven Inlining in a Region-based Optimizer for ILP Architectures
Region-based compilation repartitions a program into more desirable compilation units using profiling information and procedure inlining to enable region formation analysis. Heuristics play a key role in determining when it is most beneficial to inline procedures during region formation. An ILP optimizing compiler using a region-based approach restructures a program to better reflect dynamic be...
متن کاملResource-Aware Just-in-Time OpenCL Compiler for Coarse-Grained FPGA Overlays
FPGA vendors have recently started focusing on OpenCL for FPGAs because of its ability to leverage the parallelism inherent to heterogeneous computing platforms. OpenCL allows programs running on a host computer to launch accelerator kernels which can be compiled at run-time for a specific architecture, thus enabling portability. However, the prohibitive compilation times (specifically the FPGA...
متن کاملUsing Performance Bounds to Guide Code Compilation and Processor Design
Performance bounds represent the best achievable performance that can be delivered by target microarchitectures on specified workloads. Accurate performance bounds establish an efficient way to evaluate the performance potential of either code optimizations or architectural innovations. We advocate using performance bounds to guide code compilation. In this dissertation, we introduce a novel bo...
متن کاملA Report on Compilation Techniques for Short-Vector Instructions
Today Multimedia extensions are prevalent in embedded systems and in general-purpose designs. Short-vector instructions are common in these extensions. This paper presents some approaches for compilation of these instructions. These approaches d iffer in their work. Vectorization purely depends on the architecture and the software pipelining is compiler based technique which exploits ILP. Selec...
متن کامل